{% extends 'layout.html' %}


{% block content %}
      <div>
    <div class="container">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">新建用户</h3>
            </div>

            <div class="panel-body">
                <form method="post" novalidate>
                    {% csrf_token %}
                     {% for field in form %}
                    <div class="form-group">

                        <label>{{ field.label }}</label>
                            {{ field }}
{#                        通过前端的部分来对错误信息的展示#}
                           <span style="color: #b92c28"> {{ field.errors.0 }}</span>

                    </div>
                    {% endfor %}
                    <button type="submit" class="btn btn-primary">提交</button>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}

